Expose observed task resource targets - #461
Merged
schickling merged 2 commits intoSep 5, 2026
Conversation
schickling-assistant
force-pushed
the
schickling-assistant/2026-09-05-2026-09-05-resource-target-2
branch
from
September 5, 2026 14:04
e5b103a to
0114f21
Compare
schickling-assistant
marked this pull request as ready for review
September 5, 2026 14:33
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
agent-identity: mbp2025.direct.omp.5tek2r48 agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.11 agent-runtime: OMP 18.0.11 tooling-profile: dotfiles@4cc7b25
agent-identity: mbp2025.direct.omp.5tek2r48 agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.11 agent-runtime: OMP 18.0.11 tooling-profile: dotfiles@4cc7b25
schickling
force-pushed
the
schickling-assistant/2026-09-05-2026-09-05-resource-target-2
branch
from
September 5, 2026 17:39
0114f21 to
7957541
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
st2 tasks --jsonidentifies live task generations but does not expose a truthful resource-observation target. Downstream collectors would otherwise have to parse transient scope names, treat PIDs as identity, or maintain a second registry.Goal
Expose a typed, fail-closed resource target for each observed runtime generation without turning PID, cgroup path, or process generation into task identity.
Decisions
st2.task-inventory.v2withlinuxCgroupV2,darwinProcessTree, and boundedunavailablevariants./proc/<pid>/cgroup; never parse systemd unit names.pty stats --jsonsnapshot per inventory with kernel start-token reads. Require a unique live row with matching session name, daemon PID, and creation time.Verification
nix develop --command cargo test --lib task_inventory::tests— 13 passed.nix develop --command cargo test --test task_inventory_cli— 14 passed.mainfails the same 10 tests with 677 passed, 10 failed, 1 ignored.main; no review threads are open.Pre-flip deviations
manual_is_multiple_ofwarning incrates/st2-resource-protocol/src/lib.rs:410. The same package-level command fails identically on pristine currentmain.mainand do not exercise task inventory or resource targets.Complexity
The socket-backed PTY proof adds one bounded stats snapshot per inventory. The extra proof is necessary because registry-only PTY metadata cannot exclude PID reuse.
Concerns
The Darwin target is a best-effort process-tree root. st2 does not aggregate Darwin process resources. Linux cgroup-v2 is the first downstream accounting backend.
Friction & bottlenecks
The repository-wide baseline deviations are documented above. The focused inventory and real PTY scenarios are green.
Follow-ups
References
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile